home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / e40ds3.arc / EXAMPLE.PAS < prev    next >
Pascal/Delphi Source File  |  1989-03-10  |  676b  |  26 lines

  1. Program Example;
  2.  
  3. { This a very simple example of an E! API program }
  4. { changing the current text line for a new one    }
  5.  
  6. USES API;
  7.  
  8. TYPE sptr = ^string; { for type casting }
  9.  
  10. VAR s:pointer; { to receive address returned by Request_E_Address }
  11.  
  12. BEGIN
  13.  (* E!PRESENT (environment variable) should normally be tested *)
  14.  
  15.  s:=Request_E_Address(EDITBUFF_REQUEST);
  16.     { Retrieve Editbuffer address }
  17.  sptr(s)^:='Here I am. I replaced the original text line!';
  18.     { Modify it }
  19.  Request_E_Service(STORE_SERVICE);
  20.     { Store it }
  21.  Request_E_Service(DISPLINE_SERVICE);
  22.     { Display it }
  23.  Request_E_Service(CHANGE_SERVICE);
  24.     { Notify the change }
  25. END.
  26.